<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=8">
<SCRIPT LANGUAGE="JavaScript" src="__STATIC__/js/core/jquery.min.js"></SCRIPT>
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/default/wlife/base.css">
<link rel="stylesheet" href="__STATIC__/icon/icon.css">
<link rel="stylesheet" type="text/css" href="__STATIC__/admin/default/wlife/index.css">
</head>
<body>
<div class="AdminIndexBox">
	<div class="TopIndexBox">
		<div class="Logo"><a href="{:urls('index/welcome')}" target="main"><img src="__STATIC__/admin/default/wlife/logo.png"/></a></div>
		<div class="TopMenus">
			<ul class="ChangeShow">
				<ol><span>上一页</span></ol>
				<li><span>下一页</span></li>
			</ul>
			<div class="ListMenu">
				<ul>
{volist name="base_menu" id="vo"}
				<li{eq name='$i' value='1'} class="ck"{/eq}><span onClick="showmenu($(this),'{:urls('leftmenu',['type'=>$key])}')"><i class="{$vo.icon|default='fa fa-list-ul'}"></i>{$vo.title}</span></li>
{/volist}
				</ul>
			</div>
		</div>
	</div>
	<div class="LeftIndexBox">
		<div class="LeftContent">
			<iframe frameborder="0" id="menu" name="menu" src="{:urls('leftmenu')}" scrolling="yes" style="height:100%; visibility: inherit; width: 100%; z-index: 1;overflow: auto;"></iframe>
		</div>
	</div>
	<div class="RightIndexBox">
		<iframe frameborder="0" id="main" name="main" src="{:urls('welcome')}" scrolling="yes" style="height: 100%; visibility: inherit; width: 100%; z-index: 1;overflow: auto;"></iframe>
	</div>
</div>
<script type="text/javascript">
function set_table_size(){
	$('.AdminIndexBox .LeftIndexBox').height($(window).height()-97);
	$('.AdminIndexBox .RightIndexBox').height($(window).height()-97);
	$('.AdminIndexBox .RightIndexBox').width($(window).width()-280);
	$('.AdminIndexBox .LeftIndexBox iframe').height($(window).height()-97);
}
set_table_size();
$(window).resize(function() {
	set_table_size();
});

var topmenu_width=120;
var topmenu_length=$('.TopMenus .ListMenu ul li').length;
var ListMenu_w=$('.TopMenus .ListMenu').width();
/*alert(ListMenu_w);
Math.ceil(count / pagesize); //向上整除 4/3=2;
Math.floor(count / pagesize); //向下整除 4/3=1;*/
var listMenu_num=Math.floor(ListMenu_w / topmenu_width);//显示菜单个数
var changeMenu_num=Math.ceil(topmenu_length / listMenu_num);//切换显示次数

if(changeMenu_num>1){
	$('.ChangeShow li').addClass('ck');
}
var nowtopmenu=1;
function next_topmenu(){	
	nowtopmenu++;
	if(nowtopmenu>changeMenu_num){
		nowtopmenu=changeMenu_num;
	}else{
		change_topmenu(nowtopmenu);
	}
}
function prev_topmenu(){
	nowtopmenu--;
	if(nowtopmenu<1){
		nowtopmenu=1;
	}else{
		change_topmenu(nowtopmenu);
	}
}
function change_topmenu(num){
	var thisnum=(num-1);
	if(num==1){
		$('.ChangeShow ol').removeClass('ck');
	}else{
		$('.ChangeShow ol').addClass('ck');
	}
	if(num==changeMenu_num){
		$('.ChangeShow li').removeClass('ck');
	}else{
		$('.ChangeShow li').addClass('ck');
	}
	var left_width=topmenu_width*listMenu_num*thisnum;
	$('.TopMenus .ListMenu ul').animate({'left':'-'+left_width+'px'},500);
}
$('.ChangeShow li').click(function(){
	next_topmenu();
});
$('.ChangeShow ol').click(function(){
	prev_topmenu();
});
function showmenu(objs,url){
	$('.TopMenus .ListMenu ul li').removeClass('ck');
	objs.parent().addClass('ck');
	$('#menu').attr("src",url);
}
</script>
</body>
</html>